#include "gui.h"



gui::gui(QWidget *parent, Qt::WFlags flags):QMainWindow(parent, flags)
{
	server_listener->server=new Server();
	server_listener->server->listen(QHostAddress::Any,1234);
	QWidget* mainw=new QWidget();
	QVBoxLayout* layout=new QVBoxLayout();

	QLabel* lab=new QLabel();
	lab->setText(server_listener->server->serverAddress().toString());
	layout->addWidget(lab);
	QLabel* lab2=new QLabel();
	lab2->setNum(server_listener->server->serverPort());
	layout->addWidget(lab2);

	test=new QLabel("sdsd");
	layout->addWidget(test);

	mainw->setLayout(layout);
	this->setCentralWidget(mainw);
};



gui::~gui()
{

};



s_gui* s_gui::get_instance()
{
	static s_gui inst(0);
	return &inst;
};



void s_gui::create_gui()
{
	g=new gui();
};